<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script>
    window.onload = function() {
      // 获取当前文件所在服务器的域名
      console.log(document.domain);
      // 获取跳转过来的页面的路径
      console.log(document.referrer);
      // 获取文档中所有的image标签
      // console.log(document.images);
      // 获取文档中所有的form标签
      // console.log(document.forms);
      // 获取文档中所有的带href属性的a标签
      // console.log(document.links);
      var imgs = document.getElementsByTagName('img')
      var div = document.getElementsByName('test')
      console.log(div);
    }
  </script>
</head>
<body>
  <div name="test" data-test="myTest"></div>
  <img src="" alt="">
  <img src="" alt="">
  <img src="" alt="">
  <form action=""></form>
  <form action=""></form>
  <form action=""></form>
  <a href=""></a>
  <a href=""></a>
  <a href=""></a>
  <a></a>
</body>
</html>